package com.lv7.core.entity;

/**
 * 分页对象
 * 
 * @author Oven
 * 
 */
public class Page {

	/**
	 * 当前页码
	 */
	private int pageNo;

	/**
	 * 每页条数
	 */
	private int pageSize;

	/**
	 * 总页数
	 */
	private int pageCount;

	/**
	 * 总条数
	 */
	private int totalCount;

	public Page() {
		super();
	}

	public Page(int pageNo, int pageSize) {
		super();
		if (pageNo < 0)
			pageNo = 1;
		this.pageNo = pageNo;
		this.pageSize = pageSize;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageCount() {
		return pageCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getStart(){
		return (pageNo - 1) * pageSize;
	}
	
	public int getOffset(){
		return pageSize;
	}
}
